<template>

 <el-row :gutter="20" id="bigBox" type="flex" class="row-bg" justify="space-around" >
  <el-col :span="11"><div  style="width:100%;height:500px" ref="linemain"  class="grid-content bg-purple"></div></el-col>
  <el-col :span="11"><div  style="width:100%;height:500px"  ref="linemain2"  class="grid-content bg-purple" ></div></el-col>
</el-row>


</template>

<script>


import * as echarts from 'echarts'
export default {
    data(){
        return{ 
dataAxis : ['1号', '2号', '3号', '4号', '5号', '6号', '7号'],
data : [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 133, 334, 198, 123, 125, 220],
 yMax :500,
 dataShadow : []
        }
    },

    mounted(){
  
        this.Infinity()
        this.initEchart2()
    },
methods:{
     initEchart2(){
       let myeachrt1 = echarts.init(this.$refs.linemain2)
        myeachrt1.setOption ( {
          title: {
    text: '近七日门诊充值趋势',
    
  },
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [820, 932, 901, 934, 1290, 1330, 1320],
      type: 'line',
      smooth: true
    }
  ]
})
     },

    Infinity(){
   
var myeachrt = echarts.init(this.$refs.linemain)
myeachrt.setOption({
  title: {
    text: '近七日挂号预约情况',
    
  },
  xAxis: {
    data: this.dataAxis,
    axisLabel: {
      inside: true,
      color: '#fff'
    },
    axisTick: {
      show: false
    },
    axisLine: {
      show: false
    },
    z: 10
  },
  yAxis: {
    axisLine: {
      show: false
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      color: '#999'
    }
  },
  dataZoom: [
    {
      type: 'inside'
    }
  ],
  series: [
    {
      type: 'bar',
      barWidth: 30,
      showBackground:false,
      
      itemStyle: {
      

        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
          { offset: 0, color: '#83bff6' },
          { offset: 0.5, color: '#188df0' },
          { offset: 1, color: '#188df0' }
        ])

        ,normal: {
                barBorderRadius: [50, 50, 0, 0],
               
            },
      },
      emphasis: {
        itemStyle: {
            normal: {
                barBorderRadius: [50, 50, 0, 0],
               
            },
          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
            { offset: 0, color: '#2378f7' },
            { offset: 0.7, color: '#2378f7' },
            { offset: 1, color: '#83bff6' }
          ])
        }
      },
      data: this.data
    }
  ]
})
}}}



</script>

<style  scoped lang="less">
.el-row{
background: #f3f8ff;
margin-top: 26px;

}
.el-col{ 
  background: #ffffff
}

</style>

